<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<% String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/"; %>
<html> 
<jsp:include page="../head.jsp"></jsp:include>
<body>
<jsp:include page="Left.jsp"></jsp:include>
<br/><br/><br/>
<a href='TbProductServlet?method=showadd'><img src="./images/button-add.gif" border="0"/></a><br/>
<table>
<tr>
	<td>序号</td>
    <td>年份</td>
    <td>产品类型</td>
    <td>产品名称</td>
    <td>产品界面</td>
    <td>用户名称</td>
    <td>供应商</td>
    <td>价格</td>
    <td>修改</td>
    <td>删除</td>
</tr>
<c:forEach items="${sessionScope.tbProductPriceList==null?'':sessionScope.tbProductPriceList}" var="tbProductPrice" varStatus="status">
<tr>
	<td>&nbsp;${status.index+1}</td>
    <!-- 如果要取外键的时候 :变量名.外键属名.属性名 -->
    <td>${tbProductPrice.productDate}</td>
    <td>${tbProductPrice.tbProduct.tbProductType.productTypeName}</td>
    <td>${tbProductPrice.tbProduct.productName}</td>
    <td>${tbProductPrice.tbInterface.interfaceName}</td>
    <td>${tbProductPrice.tbUser.userName}</td>
    <td> ${tbProductPrice.tbcompany.companyName }</td>
    <td>${tbProductPrice.productPirce }</td>
    <td><a href='TbProductServlet?method=listById&productId=${tbProductPrice.tbProduct.productId}&productDate=${tbProductPrice.productDate }&productPriceMiddleId=${tbProductPrice.companyProductMiddleId }'>修改</a></td>
    <td><a href='javascript:void(0);'onclick='if(confirm("确定要删除?"))window.location="../TbProductServlet?method=del&delIds=${tbProductPrice.companyProductMiddleId}&productId=${tbProductPrice.tbProduct.productId }";'>删除</a></td>
</tr>
</c:forEach>
</table>
<jsp:include page="../foot.jsp"></jsp:include>
</body></html>